package com.bjpowernode.workbench.web.service.impl;

import com.bjpowernode.workbench.web.domain.Activity;
import com.bjpowernode.workbench.web.mapper.ActivityMapper;
import com.bjpowernode.workbench.web.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ActivityServiceImpl implements ActivityService {
    @Autowired
    private ActivityMapper activityMapper;

    @Override
    public int insertActivity(Activity activity) {
        return activityMapper.insertActivity(activity);
    }

    @Override
    public List<Activity> selectActivity(Activity activity) {
        return activityMapper.selectActivityByCondition(activity);
    }

    @Override
    public int selectCountActivityByCondition(Activity activity) {
        return activityMapper.selectActivityCountByCondition(activity);
    }

    @Override
    public int deleteActivityByIds(String[] ids) {
        return activityMapper.deleteActivityById(ids);
    }

    @Override
    public int updateActivityById(Activity activity) {
        return activityMapper.updateActivityById(activity);
    }

    @Override
    public Activity selectActivityById(String id) {
        return activityMapper.selectActivityById(id);
    }

    @Override
    public List<Activity> selectAllActivity() {
        return activityMapper.selectAllActivity();
    }

    @Override
    public List<Activity> selectCheckedActivity(String[] id) {
        return activityMapper.selectCheckedActivity(id);
    }

    @Override
    public int insertActivityByList(List<Activity> activityList) {
        return activityMapper.insertActivityByList(activityList);
    }

    @Override
    public Activity selectActivityDetailById(String id) {
        return activityMapper.selectActivityDetailById(id);
    }

    @Override
    public List<Activity> selectActivityForDetailByClueId(String clueId) {
        return activityMapper.selectActivityForDetailByClueId(clueId);
    }

    @Override
    public List<Activity> selectActivityForDetailByNameAndClueId(Map<String, String> map) {
        return activityMapper.selectActivityForDetailByNameAndClueId(map);
    }

    @Override
    public List<Activity> selectActivityForDetailByActivityIds(String[] id) {
        return activityMapper.selectActivityForDetailByActivityIds(id);
    }

    @Override
    public List<Activity> selectActivityForConvertByNameAndClueId(Map<String, Object> map) {
        return activityMapper.selectActivityForConvertByNameAndClueId(map);
    }

    @Override
    public List<Activity> selectActivityByName(String name) {
        return activityMapper.selectActivityByName(name);
    }


}
